﻿using System.ComponentModel;
using System.Windows.Media;

namespace Mesuro.Graphing.Utilities {
	public class TypefaceConverter : TypeConverter {
		public override bool CanConvertFrom( ITypeDescriptorContext context, System.Type sourceType ) {
			return sourceType == typeof( string ) || base.CanConvertFrom( context, sourceType );
		}
		public override object ConvertFrom( ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value ) {
			return new Typeface( value as string );

		}
	}
}
